import os
import sys


def writeLine():
    pass

def clearFiles(dir_name: str, ext: str = None):
    allList = os.listdir(dir_name)
    print(allList)
    for f in allList:
        if f.find('_') == 0:
            continue
        filePath = dir_name + "\\" + f

        if(os.path.isdir(filePath)):
            clearFiles(filePath, ext)
            continue

        extName = f[f.rfind('.'):]
        if extName.lower() == ext.lower():
            '''移除指定后缀文件'''
            os.remove(filePath)
